from django.apps import AppConfig


class AppNameConfig(AppConfig):
    default_auto_field = "django.db.models.BigAutoField"
    name = "wxcloudrun"

    def ready(self) -> None:
        from django.core.cache import cache
        import os

        cache.set("MCH_ID", os.environ.get("MCH_ID", "1639415934"), timeout=None)
        cache.set(
            "ENV_ID",
            os.environ.get("ENV_ID", "ymk-community-3g3m9sm8a3fa5713"),
            timeout=None,
        )
